import requests, json
import pandas as pd
h_key = "9283a3ae76c2742c8a55d9d6e6c75a24"

def weatherInfo(h_key,city,extensions='base'):
    url="https://restapi.amap.com/v3/weather/weatherInfo?parameters"
    params={
        "key":h_key,
        "city":city,
        "extensions":extensions,
        "output":'json'
    }
    response=requests.get(url,params=params)
    results=response.json()['lives'][0]['weather']
    # for key,value in results.items():
    #     print(key,",",value)
    return results